# name : hash: merge using set+parameter expression
# key : hash_merge_set+param_exp
# contributor: Shuguang Sun
# --
data ${1:match};
  set ${2:small} (obs = 1); * this will work, too!;
  retain args 'small key s_sat' n_keys 1e6;

  dcl hash ${3:hh} (dataset: substr(args,1,5), hashexp: log2(n_keys));
  $3.DefineKey( scan(s, 2) ); ** default to keep the first obs in the key, add();
  $3.DefineData( scan(s,-1) );
  $3.DefineDone();

  do until ( eof2 );
    set ${4:large} end = eof2;
    if $3.find() = 0 then output;
    end;
  stop;
run;